<?php

namespace App\Kuafu\Product\Resources;

use App\Kuafu\Common\Service\CommonService;
use Illuminate\Http\Resources\Json\JsonResource;

class PackageProductResource extends JsonResource
{

    public function toArray($request)
    {
        return [
            "id"          => $this->id,
            "packageId"   => $this->packageId,
            "menuId"      => $this->menuId,
            "productId"   => $this->productId,
            "num"         => $this->num,
            "productName" => $this->productName,
            "name"        => $this->productName,
            "price"       => $this->price,
            "unit"        => $this->unit,
            "imageUrl"    => picturePath($this->imageUrl),
            "categoryId"  => $this->categoryId,
        ]; // TODO: Change the autogenerated stub
    }

}
